import { post } from "../../../utils/request";

const addApp = ({ appName, appDes, owner, ownerDept, ownerDeptName }) =>
  post("mgt/application/add", {
    appName,
    appDes,
    owner,
    ownerDept,
    ownerDeptName
  });

const editApp = ({ appId, appName, appDes, owner, ownerDept, ownerDeptName }) =>
  post("mgt/application/edit", {
    appId,
    appName,
    appDes,
    owner,
    ownerDept,
    ownerDeptName
  });

const deleteApp = ({ appId }) =>
  post("mgt/application/del", {
    appId
  });

const getAppList = datas => post("mgt/application/list", datas);

const queryAppDetail = ({ appId }) =>
  post("mgt/application/queryDetail", { appId });

export default { addApp, editApp, deleteApp, getAppList, queryAppDetail };
